- Parse Visual Studio Copilot OpenTelemetry trace JSONL into sessions
- Emit one session per gen_ai.conversation.id, keyed by a
<traceFile>#<conversationID> virtual path
- Combine spans across sibling trace files, collapsing duplicated chat
outputs and execute_tool calls to their most complete copy, preferring
the richest token usage when visible output ties, while preserving
transcript order
- Count token usage for tool-only LLM turns whose only output is
executed tool calls, choosing the most complete usage copy across
sibling files
- Fingerprint a conversation across every sibling trace file, for both
the incremental skip check and the watcher's source-mtime fallback, so
a re-sync re-parses when any sibling gains spans, not only when the
representative trace file changes; the skip check uses the
error-returning fingerprint so a directory-enumeration or per-sibling
stat failure surfaces and is retried instead of being mistaken for an
unchanged skip, and Visual Studio Copilot is excluded from the generic
mtime skip cache so a cached entry cannot bypass that composite check
- Preserve an archived conversation instead of force-replacing it with a
partial transcript when a sibling trace is rotated away: a reparse that
shrinks both the message count and the composite trace size keeps the
stored session, so messages and tool results already in SQLite are not
dropped
- Scope session export to the requested conversation by filtering each
trace line down to that conversation's spans across every sibling
trace file, dropping other conversations' and id-less spans, so
exporting one session never discloses spans that share its trace files;
report a not-found error when no trace file contains the conversation
instead of writing empty output
- Surface and retry trace read, scan, and directory-enumeration errors,
including missing or unreadable sibling trace files, instead of caching
them as skips, and clear stale read-error skip entries on upgrade from
both the local and the per-host SSH remote skip caches
- Resolve virtual source paths for session export, path-based sync,
incremental mtime filtering, and parse-diff classification, and route
sync-by-id through the single-session path so it stays scoped to the
requested conversation and follows it across sibling trace files; the
source-file lookup returns a conversation-scoped virtual path so a
rotated-away representative does not widen a resync to the whole trace
- Add documentation on Visual Studio vs VS Code traces and synthetic
trace fixtures
Co-Authored-By: Wes McKinney <wesmckinn+git@gmail.com>
Add support for Visual Studio Copilot sessions
NOTE: did NOT test macOS\linux but added best-guess at file locations for those platforms (see types.go)
Some live screenshots from my local build: